/*
 * @Author: Anjg
 * @Date: 2022-12-08 19:26:17
 * @LastEditTime: 2022-12-27 19:39:55
 * @Description:
 */

import Mock from 'mockjs';
const randomNumber = Mock.mock('@string("0123456789",4,4)');

// 验证码登录接口
Mock.mock(/\/login\/codeLogin/, 'post', {
    code: 200,
    retMsg: 'success',
    result: {
        token: '@paragraph(2, 5)',
        name: '@cname()',
        id: '@id()'
    }
});
// 获取图形验证码接口  按需导出
Mock.mock(/\/login\/getPicCode/, 'get', {
    code: 200,
    retMsg: 'success',
    result: {
        base64: `@dataImage('50x20', '${randomNumber}')`,
        key: '@string(number,4)',
        md5: '@integer(1)'
    }
});

// 获取短信验证码接口
Mock.mock(/\/login\/getMsgCode/, 'post', {
    code: 200,
    retMsg: 'success',
        result: {
            receiptNo: '@string(number,6)'
        }
});
// 退出登录接口
Mock.mock(/\/loginOut/, 'post', {
    code: 200,
    retMsg: '退出成功',

});
